/*
** my_put_nbr.c for my_reader in /home/mayouk_j//Soutenance/my_reader
** 
** Made by jimmy mayoukou
** Login   <mayouk_j@epitech.net>
** 
** Started on  Wed Apr 25 21:12:03 2012 jimmy mayoukou
** Last update Mon Apr 30 21:02:51 2012 canh-kiet le
*/

#include	"my.h"

void		my_put_nbr(int nb, int fd)
{
  int		p;
  char		c;

  p = 1;
  while (nb / p > 10)
    p *= 10;
  while (nb)
    {
      c = (nb / p) + '0';
      xwrite(fd, &c, 1);
      nb -= (nb / p) * p;
      p /= 10;
    }
}
